package com.muyu.product.service.impl;

import com.muyu.common.core.domain.R;
import com.muyu.product.domain.pojo.ProductTypePO;
import com.muyu.product.domain.vo.ProductTypeVo;
import com.muyu.product.mapper.TypeMapper;
import com.muyu.product.service.TypeService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @ClassName TypeServiceImpl
 * @Description 描述
 * @Author ShiYu.Cui
 * @Date 2024/3/31 10:05
 */
@Service
public class TypeServiceImpl implements TypeService {
    @Autowired
    private TypeMapper typeMapper;

    @Override
    public R<List<ProductTypeVo>> typeList() {
        List<ProductTypeVo> list=typeMapper.typeList();
        return R.ok(list);
    }

    @Override
    public void addType(ProductTypeVo productTypeVo) {
        typeMapper.addType(productTypeVo);
    }

    @Override
    public void updateType(ProductTypeVo productTypeVo) {
        typeMapper.updateType(productTypeVo);
    }

    @Override
    public void delType(Integer productTypeId) {
        typeMapper.delType(productTypeId);
    }
}
